/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;

/** Generated Model for FI_PrepaidExpensesLine
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_FI_PrepaidExpensesLine extends PO implements I_FI_PrepaidExpensesLine, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20120920L;

    /** the default Constructor */
    public X_FI_PrepaidExpensesLine(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_FI_PrepaidExpensesLine (Properties ctx, int FI_PrepaidExpensesLine_ID, String trxName)
    {
      super (ctx, FI_PrepaidExpensesLine_ID, trxName);
      /** if (FI_PrepaidExpensesLine_ID == 0)
        {
			setFI_PrepaidExpensesLine_ID (0);
        } */
    }

    /** Load Constructor */
    public X_FI_PrepaidExpensesLine (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 1 - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_FI_PrepaidExpensesLine[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_Period getC_Period() throws RuntimeException
    {
		return (org.compiere.model.I_C_Period)MTable.get(getCtx(), org.compiere.model.I_C_Period.Table_Name)
			.getPO(getC_Period_ID(), get_TrxName());	}

	/** Set Period.
		@param C_Period_ID 
		Period of the Calendar
	  */
	public void setC_Period_ID (int C_Period_ID)
	{
		if (C_Period_ID < 1) 
			set_Value (COLUMNNAME_C_Period_ID, null);
		else 
			set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
	}

	/** Get Period.
		@return Period of the Calendar
	  */
	public int getC_Period_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set FI_PrepaidExpenses.
		@param FI_PrepaidExpenses_ID FI_PrepaidExpenses	  */
	public void setFI_PrepaidExpenses_ID (int FI_PrepaidExpenses_ID)
	{
		if (FI_PrepaidExpenses_ID < 1) 
			set_Value (COLUMNNAME_FI_PrepaidExpenses_ID, null);
		else 
			set_Value (COLUMNNAME_FI_PrepaidExpenses_ID, Integer.valueOf(FI_PrepaidExpenses_ID));
	}

	/** Get FI_PrepaidExpenses.
		@return FI_PrepaidExpenses	  */
	public int getFI_PrepaidExpenses_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_FI_PrepaidExpenses_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set FI_PrepaidExpensesLine_ID.
		@param FI_PrepaidExpensesLine_ID 
		FI_PrepaidExpensesLine_ID
	  */
	public void setFI_PrepaidExpensesLine_ID (int FI_PrepaidExpensesLine_ID)
	{
		if (FI_PrepaidExpensesLine_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_FI_PrepaidExpensesLine_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_FI_PrepaidExpensesLine_ID, Integer.valueOf(FI_PrepaidExpensesLine_ID));
	}

	/** Get FI_PrepaidExpensesLine_ID.
		@return FI_PrepaidExpensesLine_ID
	  */
	public int getFI_PrepaidExpensesLine_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_FI_PrepaidExpensesLine_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_GL_Journal getGL_Journal() throws RuntimeException
    {
		return (org.compiere.model.I_GL_Journal)MTable.get(getCtx(), org.compiere.model.I_GL_Journal.Table_Name)
			.getPO(getGL_Journal_ID(), get_TrxName());	}

	/** Set Journal.
		@param GL_Journal_ID 
		General Ledger Journal
	  */
	public void setGL_Journal_ID (int GL_Journal_ID)
	{
		if (GL_Journal_ID < 1) 
			set_Value (COLUMNNAME_GL_Journal_ID, null);
		else 
			set_Value (COLUMNNAME_GL_Journal_ID, Integer.valueOf(GL_Journal_ID));
	}

	/** Get Journal.
		@return General Ledger Journal
	  */
	public int getGL_Journal_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_GL_Journal_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}